<%--
  Created by IntelliJ IDEA.
  User: Vincent
  Date: 11/1/12
  Time: 12:42 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.fasterxml.jackson.databind.ObjectMapper" %>
<%@ page import="com.google.common.io.ByteStreams" %>
<%@ page import="com.ppl.server.model.User" %>
<%@ page import="java.net.URL" %>
<%@ page import="java.net.URLConnection" %>
<html>
<head>
    <title></title>
</head>
<body>
hello,world! again!

<%
            URL dest = new URL("http://localhost:9998/http/user/login/test");
            URLConnection yc = dest.openConnection();
            ObjectMapper om = new ObjectMapper();
            User user = om.readValue(ByteStreams.toByteArray(yc.getInputStream()),User.class);
            out.println(user.toString());
        %>
  </body>
</html>